﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="message.aspx.cs" Inherits="messageboard.message"
    MasterPageFile="~/Site1.Master" %>

<asp:Content ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="js/jquery-1.7.2.min.js">
        $(document).ready(function () {
            $(".title1").css("display", "none");

            $(".logo2").animate({ opacity: 0 }, 400);
            $(".logo2").css("display", "none");
            $(".message:even").animate({ left: "440px", opacity: "0.01" }, 1);
            $(".message:even").animate({ left: "440px", opacity: "0.01" }, 100);
            $(".message:even").animate({ left: "150px", opacity: "1" }, 500);
            $(".message:odd").animate({ left: "340px", opacity: "0.01" }, 1);
            $(".message:odd").animate({ left: "340px", opacity: "0.01" }, 100);
            $(".message:odd").animate({ left: "150px", opacity: "1" }, 500);
            $(".user,.state,.topbutton").animate({ opacity: "0.01" }, 1);
            $(".user,.state,.topbutton").animate({ opacity: "0.01" }, 100);
            $(".user,.state,.topbutton").animate({ opacity: "1" }, 600, function () { $(".message").click(); });

            $("#ContentPlaceHolder1_TextBox1").focus(function () {

                if (this.value == "标题") {
                    this.value = "";
                }
            });
            $("#ContentPlaceHolder1_TextBox3").focus(function () {

                if (this.value == "留言") {
                    this.value = "";
                }
            });


            $(".message").click(function () {

                $(".message").width("300px");
                $(".message").css("display", "none");
                $(".title1").css("display", "block");
                $(".logo2").css("display", "block");
                $(".title1").animate({ width: "300px" }, 400);
                $(".logo2").animate({ opacity: 1 }, 400);
            });
            $(".title1").click(function () {
                $(".title").width("700px");
                $(".title1").css("display", "none");
                $(".message").css("display", "block");
                $(".logo2").css("display", "none");
                $(".message").animate({ width: "700px" }, 400);
                $(".logo2").animate({ opacity: 0 }, 400);


            });

        });

        

    </script>
    <style type="text/css">
        .auto-style1 {
            top: 984px;
            left: 582px;
            position: absolute;
            width: 323px;
            height: 233px;
            cursor: pointer;
        }
        .auto-style2 {
            width: 154px;
            height: 107px;
            float: left;
            margin: 4px;
            text-align: center;
            font-size: 130%;
            color: #FFFFFF;
            text-align: center;
            vertical-align: middle;
        }
        .auto-style3 {
            width: 150px;
            height: 109px;
            float: left;
            margin: 4px;
            text-align: center;
            font-size: 130%;
            color: #FFFFFF;
            text-align: center;
            vertical-align: middle;
        }
        .auto-style4 {
            width: 153px;
            height: 108px;
            float: left;
            margin: 4px;
            text-align: center;
            font-size: 130%;
            color: #FFFFFF;
            text-align: center;
            vertical-align: middle;
        }
        .auto-style5 {
            width: 149px;
            height: 108px;
            float: left;
            margin: 4px;
            text-align: center;
            font-size: 130%;
            color: #FFFFFF;
            text-align: center;
            vertical-align: middle;
        }
        .auto-style6 {
            width: 81px;
            height: 54px;
        }
        .auto-style7 {
            width: 74px;
            height: 56px;
        }
        .auto-style8 {
            width: 96px;
            height: 53px;
        }
        .auto-style9 {
            width: 83px;
            height: 47px;
        }
    </style>
</asp:Content>
<asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <div style="position: absolute; left: 440px; top: 30px; width: 100px; height: 30px;">
        <asp:HyperLink ID="bp" runat="server" ImageUrl="~/images/back.png"></asp:HyperLink>
        <asp:HyperLink ID="fp" runat="server" ImageUrl="~/images/next.png"></asp:HyperLink>
    </div>
    <div class="state">
        <div style="float: right">
            <asp:Image ID="Image2" runat="server" Height="40px" Width="40px" BorderColor="White"
                BorderStyle="Solid" BorderWidth="1px" /></div>
        <div style="float: right">
            <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
        </div>
    </div>
    <br />
    <br />
    <br />
    <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
        <ItemTemplate>
            <div class="repeater">
                <div style="background-color: rgba(0,0,0,0.3); position: absolute; width: 1000px;
                    height: 170px;">
                </div>
                <div class="user">
                    <asp:Image ID="Image1" runat="server" ImageUrl='<%#"~/images/face/("+Eval("face")+").png" %>'
                        Height="120px" Width="120px" />
                    <%#Eval("name") %>
                </div>
                <div class="message">
                    <div style="text-align: center; font-size: 150%">
                        <%#Eval("title") %></div>
                    <div>
                        <%#Eval("message") %></div>
                    <div style="font-size: 70%; position: absolute; bottom: 10px; right: 10px">
                        <%#Eval("datetime") %>
                    </div>
                </div>
                <%--<div class="title1" runat="server">
                    <%#Eval("title") %></div>--%>
            </div>
        </ItemTemplate>
    </asp:Repeater>
    <div class="auto-style1">
        <div class="auto-style2" style="background-color: #CC0066" onclick="document.location='/message.aspx'">
            <br />
            <img src="/images/News.png" alt="Alternate Text" class="auto-style6" /><br />
            查看留言
        </div>
        <div class="auto-style3" style="background-color: #0998FF" onclick="document.location='/message.aspx#message'">
            <br />
            <img src="/images/Messaging.png" alt="Alternate Text" class="auto-style7" /><br />
            发布留言
        </div>
        <div class="auto-style4" style="background-color: #FFCC00" onclick="document.location='/admin/usermanage.aspx'">
            <br />
            <img src="images/Contacts.png" alt="Alternate Text" class="auto-style8" /><br />
            用户管理
        </div>
        <div class="auto-style5" style="background-color: #33CC33" onclick="document.location='/admin/messagemanage.aspx'">
            <br />
            <img src="images/Configure alt 3.png" alt="Alternate Text" class="auto-style9" /><br />
            留言管理
        </div>
    </div>
    <br />
    <br />
    <asp:TextBox ID="TextBox1" runat="server" Text="标题（不超过10字）" Width="402px"></asp:TextBox><br />
    <asp:TextBox ID="TextBox3" runat="server" Height="180px" Width="400px" TextMode="MultiLine"
        Text="留言"> </asp:TextBox><a name="message"></a>
    <br />
    <asp:Button ID="Button2" runat="server" Text="发布" OnClick="Button2_Click" CssClass="button" />
    <br />
    <br />
    <div class="topbutton" onclick="document.location='#top'">
        <div style="position: absolute; top: 3px; left: 3px">
            <asp:Image ID="Image3" runat="server" ImageUrl="~/images/top.png" />
        </div>
    </div>
</asp:Content>
